import hzcRequest from "../../../utils/https";

//用户地址获取 getConsigneeInfo
 const getConsigneeInfo=(data)=>{
     return hzcRequest.post(`/getConsigneeInfo`,data)
 }



//添加收货地址  addConsigneeInfo
 const addConsigneeInfo=(data)=>{
     return hzcRequest.post(`/addConsigneeInfo`,data)
 }
 
 //删除收货地址  addConsigneeInfo
  const delConsigneeInfo=(data)=>{
      return hzcRequest.post(`/delConsigneeInfo`,data)
  }
 
 
 //修改收货地址 updateConsigneeInfo
 const updateConsigneeInfo=(data)=>{
     return hzcRequest.post(`/updateConsigneeInfo`,data)
 }
 
 
 // 用户地址获取
 const selAddrApi = (params) => {
   return hzcRequest.get(`/api/memberAddr/selAddr?memberId=${params}`);
 };

//添加地址
const saveAddrAdd = (data) => {
  return hzcRequest.post(`/api/memberAddr/saveAddr`, data);
};

//修改地址
const updateAddr = (data) => {
  return hzcRequest.post(`/api/memberAddr/updateAddr`, data);
};

//删除地址
const delAddrDelete = (params) => {
  return hzcRequest.post(`/api/memberAddr/delAddr?id=${params}`);
};

//随机减免
const randomDerate = (params) => {
  return hzcRequest.get(`/api/pay/randomDerate?orderToken=${params}`);
};

//余额支付
const surplusPay = (data) => {
  return hzcRequest.post(`/api/pay/surplusPay`, data);
};

export {
   addConsigneeInfo,
   getConsigneeInfo,
   delConsigneeInfo,
   updateConsigneeInfo,
	
  selAddrApi,
  saveAddrAdd,
  updateAddr,
  delAddrDelete,
  randomDerate,
  surplusPay,
};
